﻿
using System.Windows;
using CefSharp;
using CefSharp.Wpf;
namespace mediaControl.Views
{
    /// <summary>
    /// Screen.xaml 的交互逻辑
    /// </summary>
    public partial class Screen1 : Window
    {
        
        public Screen1()
        {
            InitializeComponent();
        }
       
        private void Window_IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            if (!IsEnabled)
            {
                this.Close();
            }

        }

        private void videoPlayer1_MediaOpened(object sender, RoutedEventArgs e)
        {
            imagePlayer1.Visibility = Visibility.Hidden;
            web1.Visibility = Visibility.Hidden;
            if (null != web1.Children && web1.Children.Count > 0)
            {
                web1.Children.RemoveAt(web1.Children.Count - 1);
            }
            imagePlayer1.Source = null;
            
            imagePlayer1Next.Visibility = Visibility.Hidden;
            imagePlayer1Next.Source = null;
            mainpImage1.Content = null;
            mainpImage1.Visibility = Visibility.Hidden;
            
        }
    }
}
